//
//  AuthenFailView.m
//  YTwallet
//
//  Created by ZhangLin on 2019/3/11.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "AuthenFailView.h"
#import <Masonry.h>
@implementation AuthenFailView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupViews];
    }
    return self;
}

-(void)setupViews{
    self.imv = [[UIImageView alloc] init];
    self.imv.image = [UIImage imageNamed:@"renzheng＞icon_fail"];
    [self addSubview:self.imv];
    [self.imv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.mas_equalTo(60);
        make.width.mas_equalTo(130);
        make.height.mas_equalTo(130);
    }];
    
    self.tipsLab = [[UILabel alloc] init];
    self.tipsLab.text = @"认证失败";
    self.tipsLab.font = [UIFont boldSystemFontOfSize:18];
    self.tipsLab.textColor = [UIColor colorWithRed:51 / 255.0 green:51 / 255.0 blue:51 / 255.0 alpha:1];
    [self addSubview:self.tipsLab];
    [self.tipsLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.imv.mas_bottom).offset(0);
        make.centerX.equalTo(self);
    }];
    
    
    self.tipsDetailLab = [[UILabel alloc] init];
    self.tipsDetailLab.text = @"失败原因";
    self.tipsDetailLab.font = [UIFont systemFontOfSize:14];
    self.tipsDetailLab.textColor = [UIColor colorWithRed:102 / 255.0 green:102 / 255.0 blue:102 / 255.0 alpha:1];
    [self addSubview:self.tipsDetailLab];
    [self.tipsDetailLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tipsLab.mas_bottom).offset(10);
        make.centerX.equalTo(self);
    }];
    
    self.reAuthenBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.reAuthenBtn.backgroundColor = [UIColor colorWithRed:91 / 255.0 green:113 / 255.0 blue:255 / 255.0 alpha:1];
    [self.reAuthenBtn setTitle:@"重新认证" forState:(UIControlStateNormal)];
    [self.reAuthenBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
    self.reAuthenBtn.titleLabel.font = [UIFont systemFontOfSize:16];
    self.reAuthenBtn.layer.cornerRadius = 22;
    [self addSubview:self.reAuthenBtn];
    [self.reAuthenBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(68);
        make.right.mas_equalTo(-68);
        make.top.equalTo(self.tipsDetailLab.mas_bottom).offset(100);
        make.height.mas_equalTo(44);
    }];
}

@end
